package com.zt.java.back;

import java.util.concurrent.ConcurrentHashMap;

public class DemoStr {
    String str = new String("good");
    char []ch = {'a','b','c'};
    public void change(String str ,char ch[]){
        str = "test ok";
        ch[0] ='g';
    }

    public static void  main(String args[]){
//        double a= 0.1*3;
//        System.out.println(a==0.03);
////       DemoStr demo =new DemoStr();
////       demo.change(demo.str,demo.ch);
////       System.out.println(demo.str);
//        System.out.println(calulate(new int[]{2,1,1,3,2,1,2}));
//        int a = 18;
//        int b = 13;
//        System.out.println(a&15);
//        System.out.println((30-1)&15);
        ConcurrentHashMap map = new ConcurrentHashMap();
        map.put("key","value");
    }
    public static int calulate(int s[]){
        int result = 0;
        int temp = s[0];
        int duo = 0;
        for(int i=1;i<s.length;i++){
            if(s[i]<=temp){
               result += (temp-s[i]);
               duo += (temp-s[i]);
            }else{
                temp = s[i];
                duo = 0;
            }
        }
        return result-duo;

    }
}
